import Router from 'vue-router'
import Vue from 'vue'
const main = () => import(/*webpackChunkName:"name"*/'../view/main/index')
const noPage = () => import(/*webpackChunkName:"name"*/'../view/noPage')

const login = () => import(/*webpackChunkName:"name"*/'../view/login')
const other = () => import(/*webpackChunkName:"name"*/'../view/other')
const innerInformation = () => import(/*webpackChunkName:"name"*/'../view/regist/innerInformation')
const residenceType = () => import(/*webpackChunkName:"name"*/'../view/regist/residenceType')
const firstForm = () => import(/*webpackChunkName:"name"*/'../view/regist/firstForm')
const innerAccountInformation = () => import(/*webpackChunkName:"name"*/'../view/regist/innerAccountInformation')
const innerProjectInformation = () => import(/*webpackChunkName:"name"*/'../view/regist/innerProjectInformation')

const test = () => import(/*webpackChunkName:"name"*/'../view/test')
import homeRouter from './homeRouter'
// import workBenchRouter from './workBenchRouter'
import projectRouter from './projectRouter'
import companyRouter from './companyRouter'
import attendanceRouter from './attendanceRouter'
import manageRouter from './manageRouter'
import staticRouter from './staticRouter'
Vue.use(Router)
export default new Router({
  // base: process.env.BASE_URL,
  mode: 'history',
  routes: [
      {
         path: '*',
         component: noPage
      },
      {
        path: '/login',
        component: login,
        meta: {
          title: '登录'
        }
      },
      {
        path: '/',
        component: main,
        redirect: 'login'
      },
      {
        path: '/datas',
        component: other,
        meta: {
          title: '数据显示'
        }
      },
      {
        path: '/inner-information',
        component: innerInformation,
        meta: {
          title: '填写账号信息'
        }
      },
      {
        path: '/residence-type',
        component: residenceType,
        meta: {
          title: '选择入驻类型'
        }
      },
      {
        path: '/first-form',
        component: firstForm,
        meta: {
          title: '填写项目信息'
        }
      },
      {
        path: '/inner-account-information',
        component: innerAccountInformation,
        meta: {
          title: '填写账号信息'
        }
      },
      {
        path: '/inner-project-information',
        component: innerProjectInformation,
        meta: {
          title: '填写项目信息'
        }
      },
      {
        path: '/test',
        component: test,
        meta: {
          title: '测试'
        }
      },
      {
          path: '/',
          name: 'main',
          component: main,
          redirect: 'home',
          children: [
            homeRouter,
            companyRouter,
            // workBenchRouter,
            projectRouter,
            attendanceRouter,
            // manageRouter,
            // staticRouter
          ]
      }
  ]
}) 